package com.web.cms.pan.message;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;
import com.web.core.dict.PanRefType;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 共享请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年04月09日
 */
 public class ShareRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = { SaveModel.class }, message = "引用编号不能为空")
	private Integer refId; // 引用编号
	@NotNull(groups = { SaveModel.class, UpdateModel.class }, message = "用户编号不能为空")
	private Integer userId; // 用户编号
	private String code; // 唯一标识
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "共享名称不能为空")
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "共享名称长度[0-200]")
	private String name; // 共享名称
	private Date createTime; // 创建时间
	@Size(min = 0, max = 10, groups = { SaveModel.class, UpdateModel.class }, message = "访问密码长度[0-10]")
	private String password; // 访问密码
	private Integer count; // 访问次数
	@NotNull(groups = { SaveModel.class }, message = "引用类型不能为空")
	private PanRefType refType; // 引用类型：1目录，2文件
	private State state; // 状态：0正常，1作废
	
	public ShareRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getRefId()
	{
		return this.refId;
	}
	
	public void setRefId(Integer refId)
	{
		this.refId = refId;
	}
	
	public Integer getUserId()
	{
		return this.userId;
	}
	
	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}
	
	public String getCode()
	{
		return this.code;
	}
	
	public void setCode(String code)
	{
		this.code = code;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public String getPassword()
	{
		return this.password;
	}
	
	public void setPassword(String password)
	{
		this.password = password;
	}
	
	public Integer getCount()
	{
		return this.count;
	}
	
	public void setCount(Integer count)
	{
		this.count = count;
	}
	
	public PanRefType getRefType()
	{
		return this.refType;
	}
	
	public void setRefType(PanRefType refType)
	{
		this.refType = refType;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
}
